<?php

//$file = $_GET["file"];
$file = "/home/.noriko/tvsearch/thetvsearch.com/video/46min_62mb_188kbps_ar32kb.flv";
$pos = (isset($_GET["pos"])) ? intval($_GET["pos"]) : 0;

//header("Cache-Control: no-store, no-cache, must-revalidate");
//header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Content-Type: video/x-flv");
//header("Content-Length: " . (filesize($file) - $pos));

if($pos > 0)
{
  print("FLV");
  print(pack('C', 1));
  print(pack('C', 1));
  print(pack('N', 9));
  print(pack('N', 9));
}

$fh = fopen($file,"rb") or die("Could not open file: " . $file . "\n");

fseek($fh, $pos);

while (!feof($fh))
{
  print(fread($fh, 8192));
 }

fclose($fh);

?>